import Vue from 'vue'
import App from './App.vue'

import elementUI from 'element-ui';

import storage from '@/utils/storage.js'
import http from '@/utils/http.js'
import config from '@/utils/config.js'
import store from '@/store/index.js'
import router from '@/router/index.js'

import '@/styles/index.scss' // global css
import 'element-ui/lib/theme-chalk/index.css';
import '@/icons' // icon
import '@/permission' // permission control
import btnPermission from '@/utils/btn-permission.js'
import commonUtil from '@/utils/common.js'

Vue.config.productionTip = false

// 缓存数据信息对象
Vue.prototype.$storage = storage

// 统一枚举配置
Vue.prototype.$config = config

// http 请求交互对象
Vue.prototype.$http = http

// 按钮权限
Vue.prototype.$btnPermission = btnPermission

Vue.prototype.$commonUtil = commonUtil

Vue.use(elementUI)

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
}).$mount('#app')
